#include <QFile>
#include <QString>
#include <QRegExp>

int main(int argc, char **argv)
{
	 QFile file("abc");
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
         return 0;

     while (!file.atEnd()) {
         QString line = file.readLine();
		 int s = line.indexOf("<key1>");
	 	 line = line.right(line.length()-s-6);
		 int e = line.indexOf("</key1>");
		 line = line.left(e);
		  	
		 fprintf(stderr,"%s\n",line.toStdString().c_str());
     }
     return 0;
}
